Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Grafana 5.1.3 #1903

Merged
merged 1 commit into from
Jul 11, 2018
Merged

Grafana 5.1.3 #1903

merged 1 commit into from
Jul 11, 2018

Conversation

ryadav88
Copy link
Contributor

No description provided.

@realmbgl realmbgl merged commit e5434d9 into version-3.x Jul 11, 2018
@ryadav88 ryadav88 deleted the grafana branch July 11, 2018 21:49
@deric
Copy link
Contributor

deric commented Jul 12, 2018

@ryadav88 @realmbgl What's the motivation behind these changes? It appears as a regression to me. Why add java binary? Health check path /v1/health returns 404.

+++ b/repo/packages/G/grafana/6/config.json
@@ -1,75 +1,82 @@
 {
+    "type": "object", 
     "properties": {
-        "service":{
-            "type":"object",
-            "description": "DC/OS service configuration properties",
-            "properties":{
-                "name" : {
-                    "description":"Name of this service instance.",
-                    "type":"string",
-                    "default":"grafana"
+        "service": {
+            "type": "object", 
+            "description": "DC/OS service configuration properties", 
+            "properties": {
+                "name": {
+                    "description": "The name of the service instance", 
+                    "type": "string", 
+                    "default": "grafana", 
+                    "title": "Service name"
+                }, 
+                "user": {
+                    "description": "The user that the service will run as.", 
+                    "type": "string", 
+                    "default": "root", 
+                    "title": "User"
+                }, 
+                "service_account": {
+                    "description": "The service account for DC/OS service authentication. This is typically left empty to use the default unless service authentication is needed. The value given here is passed as the principal of Mesos framework.", 
+                    "type": "string", 
+                    "default": ""
+                }, 
+                "service_account_secret": {
+                    "description": "Name of the Secret Store credentials to use for DC/OS service authentication. This should be left empty unless service authentication is needed.", 
+                    "type": "string", 
+                    "default": "", 
+                    "title": "Credential secret name (optional)"
+                }, 
+                "mesos_api_version": {
+                    "description": "Configures the Mesos API version to use. Possible values: V0 (non-HTTP), V1 (HTTP)", 
+                    "type": "string", 
+                    "enum": [
+                        "V0", 
+                        "V1"
+                    ], 
+                    "default": "V1"
+                }, 
+                "log_level": {
+                    "description": "The log level for the DC/OS service.", 
+                    "type": "string", 
+                    "enum": [
+                        "OFF", 
+                        "FATAL", 
+                        "ERROR", 
+                        "WARN", 
+                        "INFO", 
+                        "DEBUG", 
+                        "TRACE", 
+                        "ALL"
+                    ], 
+                    "default": "INFO"
                 }
-            }
-        },
-        "grafana":{
-            "type": "object",
-            "description": "grafana service configuration properties",
+            }, 
+            "required": [
+                "name", 
+                "user"
+            ]
+        }, 
+        "grafana": {
+            "description": "grafana pod configuration properties", 
+            "type": "object", 
             "properties": {
                 "cpus": {
-                    "description": "CPU shares to allocate to each service instance.",
-                    "type": "number",
-                    "default": 0.3,
-                    "minimum": 0.3
-                },
+                    "description": "Grafana pod CPU requirements", 
+                    "type": "number", 
+                    "default": 2.0
+                }, 
                 "mem": {
-                    "description":  "Memory to allocate to each service instance.",
-                    "type": "number",
-                    "default": 512.0,
-                    "minimum": 512.0
-                },
-                "admin_password": {
-                    "description": "Admin password.",
-                    "type": "string",
-                    "default": "admin"
-                },
-                "plugins": {
-                    "description": "Comma separated Grafana plugins which will be installed via `grafana-cli plugins install grafana-example-app,grafana-clock-panel`. See https://grafana.com/plugins",                                                                                                     
-                    "type": "string",
-                    "default": ""
+                    "description": "Grafana pod mem requirements (in MB)", 
+                    "type": "integer", 
+                    "default": 4096
                 }
-
-            },
+            }, 
             "required": [
-                "cpus",
+                "cpus", 
                 "mem"
             ]
-        },
-        "networking":{
-            "type": "object",
-            "description": "Grafana networking configuration properties",
-            "properties": {
-                "external_access": {
-                    "type": "object",
-                    "description": "Enable access from outside the cluster through Marathon-LB.\nNOTE: this connection is unencrypted.",
-                    "properties": {
-                        "enable": {
-                            "description": "Enable or disable creating a VIP for external access through a public node running Marathon-LB.",
-                            "type": "boolean",
-                            "default": true
-                        },
-                        "external_access_port": {
-                            "description": "For external access, port number to be used for clear communication in the external Marathon-LB load balancer",                                                                                                                                                  
-                            "type": "number",
-                            "default": 13000
-                        },
-                        "virtual_host": {
-                            "description": "For external access, Virtual Host URL to be used in the external load balancer.",
-                            "type": "string",
-                            "default": "grafana.example.org"
-                        }
-                    }
-                }
-            }
         }
     }
-}
+}
\ No newline at end of file
diff --git a/repo/packages/G/grafana/5/marathon.json.mustache b/repo/packages/G/grafana/6/marathon.json.mustache
index 36f79f3a..6b29028f 100644
--- a/repo/packages/G/grafana/5/marathon.json.mustache
+++ b/repo/packages/G/grafana/6/marathon.json.mustache
@@ -1,50 +1,89 @@
+
 {
-    "id": "{{service.name}}",
-    "cpus": {{grafana.cpus}},
-    "mem": {{grafana.mem}},
-    "instances": 1,
-    "env": {
-        "GF_SECURITY_ADMIN_PASSWORD": "{{grafana.admin_password}}",
-        "GF_INSTALL_PLUGINS": "{{grafana.plugins}}"
-    },
-    "container": {
-        "type": "DOCKER",
-        "docker": {
-            "image": "{{resource.assets.container.docker.grafana-docker}}",
-            "forcePullImage": false,
-            "network": "BRIDGE",
-            "portMappings": [
-            {
-                "containerPort": 3000,
-                "hostPort": 0,
-                {{#networking.external_access.enable}}
-                "servicePort": {{networking.external_access.external_access_port}},
-                {{/networking.external_access.enable}}
-                "protocol": "tcp"
-            }
-            ]
-        }
-    },
-    "healthChecks": [
-        {
-            "protocol": "MESOS_HTTP",
-            "path": "/api/health",
-            "portIndex": 0,
-            "gracePeriodSeconds": 300,
-            "intervalSeconds": 60,
-            "timeoutSeconds": 20,
-            "maxConsecutiveFailures": 3
-        }
-    ],
-    "labels": {
-        "DCOS_PACKAGE_VERSION": "{{package.version}}",
-        "DCOS_SERVICE_NAME": "{{service.name}}",
-        "DCOS_SERVICE_PORT_INDEX": "0",
-        "DCOS_SERVICE_SCHEME": "http",
-        {{#networking.external_access.enable}}
-        "HAPROXY_GROUP": "external",
-        "HAPROXY_0_VHOST": "{{networking.external_access.virtual_host}}",
-        {{/networking.external_access.enable}}
-        "DCOS_PACKAGE_IS_FRAMEWORK": "false"
+  "id": "{{service.name}}",
+  "cpus": 1.0,
+  "mem": 1024,
+  "instances": 1,
+  "user": "{{service.user}}",
+  "cmd": "export LD_LIBRARY_PATH=$MESOS_SANDBOX/libmesos-bundle/lib:$LD_LIBRARY_PATH; export MESOS_NATIVE_JAVA_LIBRARY=$(ls $MESOS_SANDBOX/libmesos-bundle/lib/libmesos-*.so); export JAVA_HOME=$(ls -d $MESOS_SANDBOX/jdk*/jre/); export JAVA_HOME=${JAVA_HOME%/}; export PATH=$(ls -d $JAVA_HOME/bin):$PATH && export JAVA_OPTS=\"-Xms256M -Xmx512M -XX:-HeapDumpOnOutOfMemoryError\" && ./bootstrap -resolve=false -template=false && ./operator-scheduler/bin/operator svc.yml",                                                                                                                                       
+  "labels": {
+    "DCOS_COMMONS_API_VERSION": "v1",
+    "DCOS_COMMONS_UNINSTALL": "true",
+    "DCOS_PACKAGE_FRAMEWORK_NAME": "{{service.name}}",
+    "MARATHON_SINGLE_INSTANCE_APP": "true",
+    "DCOS_SERVICE_NAME": "{{service.name}}",
+    "DCOS_SERVICE_PORT_INDEX": "0",
+    "DCOS_SERVICE_SCHEME": "http"
+  },
+  {{#service.service_account_secret}}
+  "secrets": {
+    "serviceCredential": {
+      "source": "{{service.service_account_secret}}"
     }
+  },
+  {{/service.service_account_secret}}
+  "env": {
+    "PACKAGE_NAME": "{{package-name}}",
+    "PACKAGE_VERSION": "{{package-version}}",
+    "PACKAGE_BUILD_TIME_EPOCH_MS": "1531343768523",
+    "PACKAGE_BUILD_TIME_STR": "2018-07-11T21:16:08.523025",
+    "FRAMEWORK_NAME": "{{service.name}}",
+    "FRAMEWORK_USER": "{{service.user}}",
+    "FRAMEWORK_PRINCIPAL": "{{service.service_account}}",
+    "FRAMEWORK_LOG_LEVEL": "{{service.log_level}}",
+    "MESOS_API_VERSION": "{{service.mesos_api_version}}",
+
+    "GRAFANA_CPUS": "{{grafana.cpus}}",
+    "GRAFANA_MEM": "{{grafana.mem}}",
+
+    "NODE_COUNT": "{{node.count}}",
+    "NODE_PLACEMENT": "{{{node.placement_constraint}}}",
+
+    "NODE_CPUS": "{{node.cpus}}",
+    "NODE_MEM": "{{node.mem}}",
+    "NODE_DISK": "{{node.disk}}",
+    "NODE_DISK_TYPE": "{{node.disk_type}}",
+
+    "JAVA_URI": "{{resource.assets.uris.jre-tar-gz}}",
+    "EXECUTOR_URI": "{{resource.assets.uris.executor-zip}}",
+    "BOOTSTRAP_URI": "{{resource.assets.uris.bootstrap-zip}}",
+    "GRAFANA_URI": "{{resource.assets.uris.grafana-tar-gz}}",
+    {{#service.service_account_secret}}
+    "DCOS_SERVICE_ACCOUNT_CREDENTIAL": { "secret": "serviceCredential" },
+    "MESOS_MODULES": "{"libraries":[{"file":"libmesos-bundle\/lib\/mesos\/libdcos_security.so","modules":[{"name": "com_mesosphere_dcos_ClassicRPCAuthenticatee"},{"name":"com_mesosphere_dcos_http_Authenticatee","parameters":[{"key":"jwt_exp_timeout","value":"5mins"},{"key":"preemptive_refresh_duration","value":"30mins"}]}]}]}",                                                                                                                           
+    "MESOS_AUTHENTICATEE": "com_mesosphere_dcos_ClassicRPCAuthenticatee",
+    "MESOS_HTTP_AUTHENTICATEE": "com_mesosphere_dcos_http_Authenticatee",
+    {{/service.service_account_secret}}
+    "LIBMESOS_URI": "{{resource.assets.uris.libmesos-bundle-tar-gz}}"
+  },
+  "uris": [
+    "{{resource.assets.uris.bootstrap-zip}}",
+    "{{resource.assets.uris.jre-tar-gz}}",
+    "{{resource.assets.uris.scheduler-zip}}",
+    "{{resource.assets.uris.libmesos-bundle-tar-gz}}",
+    "{{resource.assets.uris.svc}}"
+  ],
+  "upgradeStrategy":{
+    "minimumHealthCapacity": 0,
+    "maximumOverCapacity": 0
+  },
+  "healthChecks": [
+    {
+      "protocol": "MESOS_HTTP",
+      "path": "/v1/health",
+      "gracePeriodSeconds": 900,
+      "intervalSeconds": 30,
+      "portIndex": 0,
+      "timeoutSeconds": 30,
+      "maxConsecutiveFailures": 0
+    }
+  ],
+  "portDefinitions": [
+    {
+      "port": 0,
+      "protocol": "tcp",
+      "name": "api",
+      "labels": { "VIP_0": "/api.{{service.name}}:80" }
+    }
+  ]
 }
diff --git a/repo/packages/G/grafana/5/package.json b/repo/packages/G/grafana/6/package.json
index 3f1d5271..dac1aa28 100644
--- a/repo/packages/G/grafana/5/package.json
+++ b/repo/packages/G/grafana/6/package.json
@@ -1,22 +1,23 @@
 {
-  "packagingVersion": "4.0",
-  "name": "grafana",
-  "version": "5.0.1-5.1.0",
-  "scm": "https://github.com/grafana/grafana",
-  "maintainer": "https://dcos.io/community",
-  "website": "https://grafana.com",
-  "description": "Grafana is a leading open source application for visualizing large-scale measurement data. It provides a powerful and elegant way to create, share, and explore data and dashboards from your disparate metric databases, either with your team or the world. Grafana is most commonly used for Internet infrastructure and application analytics, but many use it in other domains including industrial sensors, home automation, weather, and process control. Grafana features pluggable panels and data sources allowing easy extensibility. There is currently rich support for Graphite, InfluxDB and OpenTSDB. There is also experimental support for KairosDB, and SQL is on the roadmap. Grafana has a variety of panels, including a fully featured graph panel with rich visualization options. In order to install Grafana plugins use ENV variable with plugin names separated by comma, e.g.: `GF_INSTALL_PLUGINS=grafana-piechart-panel`.\n\nThis package can be used alongside the DC/OS 'cadvisor' and 'influxdb' packages for a cluster-wide monitoring solution.\n\nInstallation Documentation: https://github.com/dcos/examples/tree/master/cadvisor-influxdb-grafana\n\n",                                      
-  "tags": [
-    "grafana",
-    "monitoring",
-    "visualization"
-    ],
-  "preInstallNotes": "This DC/OS Service is currently in preview. There may be bugs, incomplete features, incorrect documentation, or other discrepancies.\n\n```Advanced Installation options notes```\n\nnetworking / *external_access*: create an entry in Marathon-LB for accessing the service from outside of the cluster\n\nnetworking / *external_access_port*: port to be used in Marathon-LB for accessing the service.",                                 
-  "postInstallNotes": "Service installed.\n\nIt is recommended to access this service through the endpoint created in Marathon-LB.\n\nDefault login: `admin`/`admin`.",                                                                                                                                      
-  "licenses": [
-    {
-      "name": "Apache License",
-      "url": "http://www.apache.org/licenses/LICENSE-2.0"
-    }
-  ]
-}
+    "packagingVersion": "4.0", 
+    "upgradesFrom": [
+        "*"
+    ], 
+    "downgradesTo": [
+        "*"
+    ], 
+    "minDcosReleaseVersion": "1.10", 
+    "name": "grafana", 
+    "version": "5.5.0-5.1.3", 
+    "maintainer": "https://dcos.io/community", 
+    "description": "An example implemendation of Grafana on DC/OS", 
+    "selected": false, 
+    "framework": true, 
+    "tags": [
+        "grafana", 
+        "monitoring", 
+        "visualization"
+    ], 
+    "postInstallNotes": "DC/OS Grafana is being installed!", 
+    "postUninstallNotes": "DC/OS Grafana is being uninstalled."
+}
\ No newline at end of file
diff --git a/repo/packages/G/grafana/5/resource.json b/repo/packages/G/grafana/6/resource.json
index 9a67844a..b90cb63b 100644
--- a/repo/packages/G/grafana/5/resource.json
+++ b/repo/packages/G/grafana/6/resource.json
@@ -1,19 +1,62 @@
 {
-  "images": {
-    "icon-small": "https://downloads.mesosphere.com/assets/universe/000/grafana-icon-small.png",
-    "icon-medium": "https://downloads.mesosphere.com/assets/universe/000/grafana-icon-medium.png",
-    "icon-large": "https://downloads.mesosphere.com/assets/universe/000/grafana-icon-large.png",
-    "screenshots": [
-      "http://grafana.org/assets/img/blog/v3.0/wP-Screenshot-dash-web.png",
-      "https://prometheus.io/assets/grafana_prometheus-cbb943f0bb3.png",
-      "https://grafana.com/blog/img/docs/v45/query_inspector.png"
-    ]
-  },
-  "assets": {
-    "container": {
-      "docker": {
-        "grafana-docker": "grafana/grafana:5.1.0"
-      }
+    "assets": {
+        "uris": {
+            "jre-tar-gz": "https://downloads.mesosphere.com/java/server-jre-8u162-linux-x64.tar.gz", 
+            "libmesos-bundle-tar-gz": "https://downloads.mesosphere.com/libmesos-bundle/libmesos-bundle-1.11.0.tar.gz", 
+            "bootstrap-zip": "http://downloads.mesosphere.com/dcos-commons/artifacts/0.42.1/bootstrap.zip", 
+            "executor-zip": "http://downloads.mesosphere.com/dcos-commons/artifacts/0.42.1/executor.zip", 
+            "scheduler-zip": "https://s3-us-west-1.amazonaws.com/mbgl-bucket/sdk/0.42.1/operator-scheduler.zip", 
+            "svc": "https://ecosystem-repo.s3.amazonaws.com/grafana/artifacts/5.5.0-5.1.3/svc.yml", 
+            "grafana-tar-gz": "https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.1.3.linux-x64.tar.gz"
+        }
+    }, 
+    "images": {
+        "icon-small": "https://downloads.mesosphere.com/assets/universe/000/grafana-icon-small.png", 
+        "icon-medium": "https://downloads.mesosphere.com/assets/universe/000/grafana-icon-medium.png", 
+        "icon-large": "https://downloads.mesosphere.com/assets/universe/000/grafana-icon-large.png", 
+        "screenshots": [
+            "https://prometheus.io/assets/grafana_prometheus-cbb943f0bb3.png", 
+            "https://grafana.com/blog/img/docs/v45/query_inspector.png"
+        ]
+    }, 
+    "cli": {
+        "binaries": {
+            "darwin": {
+                "x86-64": {
+                    "contentHash": [
+                        {
+                            "algo": "sha256", 
+                            "value": "c459d2109b31fc0b423f8cacd49df855ef898e63609f7050957f4a0e044d5432"
+                        }
+                    ], 
+                    "kind": "executable", 
+                    "url": "https://downloads.mesosphere.com/dcos-commons/artifacts/0.42.1/dcos-service-cli-darwin"
+                }
+            }, 
+            "linux": {
+                "x86-64": {
+                    "contentHash": [
+                        {
+                            "algo": "sha256", 
+                            "value": "e580ee8b71c0c26b1a1a605ca09cbd3528a2c031a8de11519024ccbbce862339"
+                        }
+                    ], 
+                    "kind": "executable", 
+                    "url": "https://downloads.mesosphere.com/dcos-commons/artifacts/0.42.1/dcos-service-cli-linux"
+                }
+            }, 
+            "windows": {
+                "x86-64": {
+                    "contentHash": [
+                        {
+                            "algo": "sha256", 
+                            "value": "9135f9456a40cd53e27e73e44fc94c1d4cbf27d9b59f2b47d82bad3ae0f8c714"
+                        }
+                    ], 
+                    "kind": "executable", 
+                    "url": "https://downloads.mesosphere.com/dcos-commons/artifacts/0.42.1/dcos-service-cli.exe"
+                }
+            }
+        }
     }
-  }
-}
+}
\ No newline at end of file

@deric deric mentioned this pull request Jul 13, 2018
@janisz
Copy link
Contributor

janisz commented Jun 5, 2020

Why it was merged? It removes Grafana plugins?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants